<template>
    <div>
        <div v-for="item in list" :key="item._id">
            <p>{{ item.name }}</p>

        </div>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios'
import {ref,onMounted} from 'vue'
import { useRouter,useRoute } from 'vue-router';
let list = ref([])
const route=useRoute()
let getList=async()=>{
    let {data:{data}}=await axios.get('http://localhost:3000/lx/detail')
    list.value=data.filter((item)=>item._id==route.query.id) 
    console.log(route.query);
    
}
onMounted(()=>{
    getList()
})

</script>

<style scoped>

</style>